package com.tqw.auth.dao;

import com.tqw.auth.pojo.ClientSignIn;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @author Van
 */
@Mapper
public interface SignInClientMapper {
    @Insert("insert into client(username,password,email,phone,created_time,updated_time) values(#{username},#{password},#{email},#{phone},#{createdTime},#{updatedTime})")
    void addClient(ClientSignIn clientSignIn);

    @Update("update client set create_by = (select id from client where username=#{username}),update_by = (select id from client where username=#{username}) where username = #{username}")
    void updateClient(ClientSignIn clientSignIn);
}
